package com.qfedu.yige.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qfedu.yige.pojo.Money;
import com.qfedu.yige.service.MoneyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/money")
public class MoneyController {

    @Autowired
    private MoneyService moneyService;

    @RequestMapping("/findmoney")
    public double findMoney(Double uid){
        QueryWrapper<Money> qw = new QueryWrapper<>();
         qw.eq("uid",uid);
        Money one = moneyService.getOne(qw);
        return one.getMblance();



    }
}
